# while 循环
a = 1
while a < 10:
    print(a)
    a += 1

# 计算10内的累加和
i = 1
sum = 0
while i <= 10:
    sum += i
    i += 1
print("sum:" + str(sum))

# 计算1到100所有偶数的和
i = 0
sum = 0
while i <= 100:
    if not bool(i % 2):  # if(i%2==0):
        sum += i
    i += 1

'''
while i<=100:
    sum+=i
    i+=2'''
print("100以内偶数和：" + str(sum))
